<template>
  <div class="nav-bar" :style="{'color': textColor, 'background-color': bgColor}">
    <div class="nav-bar-left">
      <slot name="left"></slot>
    </div>
    <div class="nav-bar-center">
      <slot name="center"></slot>
    </div>
    <div class="nav-bar-right">
      <slot name="right"></slot>
    </div>
  </div>
</template>

<script>
export default {
  name: "NavBar",
  props: {
    textColor: {
      type: String,
      default() {
        return "#666";
      }
    },
    bgColor: {
      type: String,
      default() {
        return "#fff";
      }
    }
  }
}
</script>

<style scoped>
.nav-bar {
  display: flex;
  height: 44px;
  line-height: 44px;
  text-align: center;
  z-index: 9;
}

.nav-bar-center {
  flex: 1;
}

.nav-bar-left {
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav-bar-left, .nav-bar-right {
  width: 60px;
}
</style>